<#import "/layout.html" as c>
    <#import "/list_layout.html" as list>
        <#assign alertList = []/>
        <@c.html title="Index">
        <!-- ================== 开始页面所需CSS引入 ================== -->
        <!-- 富文本编辑器 -->
        <link type="text/css" rel="stylesheet" href="${pluginsRoot}bootstrap-wizard/css/bwizard.min.css"/>
        <link type="text/css" rel="stylesheet" href="${pluginsRoot}ueditor/themes/default/css/ueditor.css">
        <link type="text/css" rel="stylesheet" href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/WdatePicker.css" />
        <link type="text/css" rel="stylesheet" href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/default/datepicker.css" />
        <!-- ================== 开始页面所需CSS引入 ================== -->
        <@list.html title="协议管理" subTitle="协议管理" alertList=alertList permi="sys:bank:save" addBtn=true searchHint="请输入模板名称为关键词进行搜索">

        <!-- 开始用户权限参数 -->
        <!--<@shiro.hasPermission name="sys:bank:edit">-->
        <!--<input type="hidden" id="editBank" value="1"/>-->
    <!--</@shiro.hasPermission>-->
    <!--<@shiro.hasPermission name="sys:bank:del">-->
    <!--<input type="hidden" id="delBank" value="1"/>-->
</@shiro.hasPermission>
<!-- 结束用户权限参数 -->

<!--开始新增协议模态窗口 &ndash;&gt;-->
    <div class="modal fade" id="addModal" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title"> 新增协议 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
                </div>
                <div class="modal-body">
                    <form id="addForm" class="form-horizontal form-bordered p-0" autocomplete="off" action="${adminRoot}pdf/json/add" method="post" data-parsley-validate="true">
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">模板名称<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                            <div class="col-md-10 col-sm-8">
                                <input type="text" name="name" class="form-control" placeholder="请输入内容标题" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">状态&nbsp;: </label>
                            <div class="col-md-9 col-sm-8">
                                <input type="checkbox" class="addStatus" autocomplete="off"
                                       data-input-name="status"
                                       data-size="small"
                                       data-on-color="primary"
                                       data-on-text="启用"
                                       data-off-text="禁用"
                                       data-input-true="1"
                                       data-input-false="2"
                                       checked/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">类型<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                            <div class="col-md-10 col-sm-8">
                                <select  name="type" id ="type" class="form-control" data-parsley-required="true" >
                                    <option value ="1">投资协议</option>
                                    <option value ="2">注册协议</option>
                                    <option value ="3">转让协议</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">内容&nbsp;:</label>
                            <div class="col-md-10 col-sm-8"><script id="contnetAdd" style="width: 100%; height: 350px;"></script></div>
                        </div>

                        <div class="form-group no-border">
                            <label class="control-label col-md-2 col-sm-3">附件图片&nbsp;:</label>
                            <div class="col-md-9 col-sm-8">
                                <input type="hidden" id="addFormUploadImage" name="upLoadImage">
                                <div class="row article-pic" name="preview"></div>
                                <span class="btn btn-sm btn-white fileinput-button" data-tip="tooltip" data-placement="auto" data-original-title="上传图片支持jpg/gif/png格式，大小不要超过2M。上传后可点击“插入”按钮将附件嵌入文本编辑器中。"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="addFormFile" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a><a href="javascript:;" class="btn btn-success" data-loading-text="Loading..." nc-ajax-submit-target="addForm" nc-ajax-submit>确认提交</a></div>
            </div>
        </div>
    </div>
<!--结束新增协议模态窗口 &ndash;&gt;-->

<!-- 开启编辑协议模态窗口 &ndash;&gt;-->
    <div class="modal fade" id="editModal" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title"> 编辑协议 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
                </div>
                <div class="modal-body">
                    <form id="editForm" class="form-horizontal form-bordered p-0" autocomplete="off" action="${adminRoot}pdf/json/edit" method="post" data-parsley-validate="true">
                        <input type="hidden" name="id" value="">
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">模板名称<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                            <div class="col-md-10 col-sm-8">
                                <input type="text" name="name" class="form-control" placeholder="请输入内容标题" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">状态&nbsp;: </label>
                            <div class="col-md-9 col-sm-8">
                                <input type="checkbox" class="editStatus" autocomplete="off"
                                       data-input-name="status"
                                       data-size="small"
                                       data-on-color="primary"
                                       data-on-text="启用"
                                       data-off-text="禁用"
                                       data-input-true="1"
                                       data-input-false="2"
                                       checked/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">类型<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                            <div class="col-md-10 col-sm-8">
                                <select  name="type" id ="editType" class="form-control" data-parsley-required="true" >
                                    <option value ="1">投资协议</option>
                                    <option value ="2">注册协议</option>
                                    <option value ="3">转让协议</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">内容&nbsp;:</label>
                            <div class="col-md-10 col-sm-8"><script id="contnetEditor" style="width: 100%; height: 350px;"></script></div>
                        </div>

                        <div class="form-group no-border">
                            <label class="control-label col-md-2 col-sm-3">附件图片&nbsp;:</label>
                            <div class="col-md-9 col-sm-8">
                                <input type="hidden" id="editFormUploadImage" name="upLoadImage">
                                <div class="row article-pic" name="preview"></div>
                                <span class="btn btn-sm btn-white fileinput-button" data-tip="tooltip" data-placement="auto" data-original-title="上传图片支持jpg/gif/png格式，大小不要超过2M。上传后可点击“插入”按钮将附件嵌入文本编辑器中。"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="editFormFile" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a><a href="javascript:;" class="btn btn-success" data-loading-text="Loading..." nc-ajax-submit-target="editForm" nc-ajax-submit>确认提交</a></div>
            </div>
        </div>
    </div>
<!-- 结束编辑协议模态窗口 &ndash;&gt;-->

 <!--开始填参摸态窗口-->
    <div class="modal fade" id="addParamModal" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title"> 填参 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
                </div>
                <div class="modal-body">
                    <form id="addParamForm" class="form-horizontal form-bordered p-0" autocomplete="off" action="${adminRoot}pdf/json/param" method="post" data-parsley-validate="true">
                        <input type="hidden" name="id" value="">
                        <div class="form-group">
                            <label class="control-label col-md-2 col-sm-3">参数&nbsp;:</label>
                            <div class="col-md-10 col-sm-8">
                                <div id="constantVal"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a><a href="javascript:;" class="btn btn-success" data-loading-text="Loading..." nc-ajax-submit-target="addParamForm" nc-ajax-submit>确认提交</a></div>
            </div>
        </div>
    </div>
 <!--结束填参摸态窗口-->
</@list.html>
<!-- ================== 开始页面级JavaScrip调用 ================== -->

<script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>

<script src="${pluginsRoot}ueditor/ueditor.config.js"></script>
<script src="${pluginsRoot}ueditor/ueditor.all.js"></script>
<script src="${pluginsRoot}ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>
<script src="${jsRoot}setting/pdf.handle.js"></script>
<!-- ================== 结束页面级JavaScrip调用 ================== -->
</@c.html>